package unit5.part12.circle;

import java.util.Scanner;

class Circle {// 圆圈
    private static int count;// 定义int类型的静态私有属性count，作为圆圈的计数
    private double radius;// 定义double类型的私有属性radius，作为圆圈半径

    public Circle(double radius) {
        this.radius = radius;
        count++;// count属性自增
    }

    class Draw {// 画笔
        public void drawShape() {// 绘制图形
            System.out.println("绘制第" + count + "个圆圈，它的半径为" + radius);  //打印外部类的count和radius属性
        }
    }
}

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double radius = scanner.nextDouble();
        Circle.Draw draw = new Circle(radius).new Draw();// 创建画笔Draw对象，传入圆圈半径值radius
        draw.drawShape();// 画笔Draw对象调用方法绘制图形
    }
}